package com.dayaokeji.rhythmschoolstudent.client.home.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.dayaokeji.rhythmschoolstudent.R
import com.dayaokeji.server_api.domain.Course

/**
 *********************************************************************
 **  Created by Zeno on 2018/7/26
 *********************************************************************
 **  version 1.0
 *********************************************************************
 **  Copyright (C) dayaokeji.com 2018 -- 2020 All rights reserved.
 *********************************************************************
 **
 *********************************************************************
 */
class JoinCourseListAdapter: BaseQuickAdapter<Course,BaseViewHolder>(R.layout.item_join_course_list,null) {

    override fun convert(helper: BaseViewHolder?, item: Course?) {
        helper?.addOnClickListener(R.id.tv_join_course)
        helper?.setText(R.id.tv_title, item?.getName())
        helper?.setText(R.id.tv_class_room, item?.getRoomName())
        helper?.setText(R.id.tv_teacher_name, mContext.getString(R.string.teacher_name, item?.getTeacherName()))
        helper?.setText(R.id.tv_time, item?.getActStartTime())
        helper?.setText(R.id.tv_join_code, mContext.getString(R.string.join_code, item?.getId()))
    }
}